<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.io.*,java.util.*"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
<link href="../css/merchant.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="../img/index.ico">
<script language="JavaScript"
	src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script language="JavaScript" src="../js/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="../css/add_dish.css" />

<link rel="stylesheet" type="text/css" href="../css/normalize.css" />
<link rel="stylesheet" type="text/css" href="../css/demo.css" />
<link rel="stylesheet" type="text/css" href="../css/icons.css" />
<link rel="stylesheet" type="text/css" href="../css/component.css" />
<link rel="stylesheet" type="text/css" href="../css/head.css" />

</head>
</head>
<body>


	<ul id="nav" class="hul">
	<img src="http://10.222.232.168:83/img/logo.png"/>
	<li class="logout"><a href="logOut" >注销</a></li>
	<li class="logout"><a href="orderManager.jsp" id="newMsg"></p></a></li>
	</ul>

	<div id="st-container" class="st-container">
		<!--
        example menus
        these menus will be on top of the push wrapper
    -->
		<nav class="st-menu st-effect-1" id="menu-1">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-2" id="menu-2">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-4" id="menu-4">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-5" id="menu-5">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-9" id="menu-9">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-10" id="menu-10">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-11" id="menu-11">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-12" id="menu-12">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>

		<nav class="st-menu st-effect-13" id="menu-13">
		<h2 class="icon icon-lab">商家</h2>
		<ul>
			<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
			<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
			<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
			<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
		</ul>
		</nav>


		<div class="st-pusher">
			<nav class="st-menu st-effect-3" id="menu-3">
			<h2 class="icon icon-lab">商家</h2>
			<ul>
				<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
				<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
				<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
				<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
			</ul>
			</nav>

			<nav class="st-menu st-effect-6" id="menu-6">
			<h2 class="icon icon-lab">商家</h2>
			<ul>
				<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
				<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
				<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
				<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
			</ul>
			</nav>

			<nav class="st-menu st-effect-7" id="menu-7">
			<h2 class="icon icon-lab">商家</h2>
			<ul>
				<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
				<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
				<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
				<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
			</ul>
			</nav>

			<nav class="st-menu st-effect-8" id="menu-8">
			<h2 class="icon icon-lab">商家</h2>
			<ul>
				<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
				<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
				<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
				<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
			</ul>
			</nav>

			<nav class="st-menu st-effect-14" id="menu-14">
			<h2 class="icon icon-lab">商家</h2>
			<ul>
				<li><a class="icon icon-data" href="dishManager.jsp">菜单管理</a></li>
				<li><a class="icon icon-study" href="orderManager.jsp">订单管理</a></li>
				<li><a class="icon icon-wallet" href="historyOrder.jsp">历史订单</a></li>
				<li><a class="icon icon-phone" href="findMerchant">商家信息</a></li>
			</ul>
			</nav>
			<div class="st-content">
				<div class="st-content-inner">

					<div class="main clearfix">
						<div id="st-trigger-effects" class="column">

							<button data-effect="st-effect-8">商家管理</button>

						</div>
						<div class="dish">

							<table>
								<tr>
									<th>下单时间</th>
									<th>菜单</th>
									<th>总价</th>
									<th>购买者</th>
								</tr>
								<tr>
									<th>${order.orderTime }</th>
									<th>
										<table>
											<tr>
												<th>图标</th>
												<th>菜名</th>
												<th>单价</th>

											</tr>
											<c:forEach var="v" items="${dishes }">
												<tr>
													<th>${v.dicon }</th>
													<th>${v.dname }</th>
													<th>${v.price }</th>
												</tr>
											</c:forEach>
										</table>
									</th>
									<th>${order.total }</th>
									<th>${order.user.account }</th>

								</tr>
							</table>


						</div>


					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="../js/classie.js"></script>
	<script src="../js/sidebarEffects.js"></script>

</body>

<script type="text/javascript">
$(document).ready(function() { 

	var ws = new WebSocket('ws://10.222.232.168:8099/Merchant/websocket');
	
    ws.onopen = function () {
     console.log("onopen")
    };

    ws.onmessage = function (event) {
        console.log("onmessage");
        var newMsgText=document.getElementById("newMsg");
        newMsgText.innerHTML="您有新订单";
    };

    ws.onclose = function (event) {
        console.log("onclose")
    };
});

</script>
</html>


